package com.wanshi.interceptor;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;

//@Configuration
public class WebMvConfig extends WebMvcConfigurationSupport {


        @Autowired
        private AuthenticationFilter authenticationFilter;

        @Override
        public void addInterceptors(InterceptorRegistry registry) {
            registry.addInterceptor(authenticationFilter)
                     .addPathPatterns("/**")
                    .excludePathPatterns("/user/login");
        }
}
